package service.impl;

import dao.impl.GoodsDaoImpl;
import entity.Goods;
import service.IGoodsService;

public class GoodsServiceImpl implements IGoodsService{

	private GoodsDaoImpl gdi = new GoodsDaoImpl();
	
	@Override
	public boolean save(Goods goods) {
		return gdi.save(goods);
	}

	@Override
	public boolean delete(Goods goods) {
		return gdi.delete(goods);
	}

	@Override
	public boolean update(Goods goods) {
		return gdi.update(goods);
	}

	@Override
	public Goods selectById(int id) {
		return gdi.selectById(id);
	}

	@Override
	public Goods[] selectAll() {
		return gdi.selectAll();
	}

	@Override
	public boolean sale(Goods goods) {
		return gdi.sale(goods);
	}

	@Override
	public Goods[] selectByName(String name) {
		return gdi.selectByName(name);
	}

	@Override
	public Goods[] selectByPrice(double low, double high) {
		return gdi.selectByPrice(low, high);
	}

	@Override
	public Goods[] selectAllNoStates() {
		return gdi.selectAllNoStates();
	}

	@Override
	public Goods[] sortByAmountDesc() {
		return gdi.sortByAmountDesc();
	}

}
